package com.qifenqian.turbot.module.contract

import com.qifenqian.turbot.module.entity.response.CommentEntity
import com.qifenqian.turbot.net.ModelCallback

/**
 * @author H
 * @createTime 2018/12/28 14:06
 * @description
 * @see
 * @since
 */
interface CommentContract {

    interface Model {
        /**
         * 获取评论列表
         */
        fun getCommentList(page: Int, callback: ModelCallback<List<CommentEntity>>)

        /**
         * 回复评论
         */
        fun reply(commentId: Int, replyContent: String, replyUserCode: String, callback: ModelCallback<Nothing>)
    }

    interface View  {
        fun getCommentListResult(isSuccess: Boolean, code: Int = 0, msg: String? = null, commentEntities: List<CommentEntity>? = null)

        fun replyResult(isSuccess: Boolean, code: Int = 0, msg: String? = null)
    }

    interface Presenter {
        fun getCommentList(page: Int)

        fun reply(commentId: Int, replyContent: String, replyUserCode: String)
    }
}
